#pragma once
#ifndef _I_RESONSER_H_

#define _I_RESONSER_H_

#include "AbstractIRequest.h"

class AbstractIResonser
{
public:

	inline AbstractIResonser() {}

	/* 访问属性 */
	virtual void * getConnectionId() = 0;
	virtual __int64 getTotalSentBytes() = 0;
	virtual __int64 getTotalRecvBytes() = 0;
	virtual int getServerCode() = 0;

	/* 返回响应头 */
	virtual std::string getHeader() = 0;

	/* 控制运行 */
	virtual int run(void *connId, void * clientSock, AbstractIRequest *request) = 0;
	virtual bool stop(int ec) = 0;
	virtual bool reset() = 0;

private:
	AbstractIResonser(AbstractIResonser &);

	AbstractIResonser  & operator = (AbstractIResonser &);

};


#endif // !_I_REQUEST_H_
